home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 112 / EnigmaAmiga112CD.iso / dalla rivista / awnpipe / awnp / awnp-docs / basic.doc < prev    next >
Text File  |  2000-05-14  |  2KB  |  14 lines

  1.  The sections on the conversation are important but do not try to memorize it all. It is enough to understand the general process.
  2.  
  3.  GUIs are defined and operated by means of a conversation with a special host built into the AWNP device. The host is accessed by opening a file . You  write lines of text to the file and read the file to see the response.
  4.  
  5.  The GUI is defined by writing text lines to the file. You first write a line that defines the window title and other attributes of the window you want to create. Now you read back a response line from the pipe to make sure the window definition was ok. Next you write a line of text defining a gadget to have in the window and read another response line. This line will contain the Gadget ID assigned to the gadget you created. You can create as many gadgets as you like.
  6.  Once you finish defining gadgets you open the window by writing a line containing the single word 'open'. You read back a response line confirm the window opened ok.
  7.  
  8.  Now that the GUI is created and open you simply continue to read lines from the file. When the user selects a gadget in the GUI you receive an event line containing the GID of the gadget selected and other data such the text entered in a string gadget. When the GUI window is closed you receive an EndOfFile.
  9.  
  10.  In some cases you will want to modify a gui after it has already been opened. This can be done by writing a lines of text to the file after it has been opened or after you read an event. You read a response to the modify line.
  11.  
  12.  For many GUIs you can tell the host to not send any response lines making the conversation even simpler. You can just write the GUI definition lines then read the event lines.
  13.  
  14.